<template>
  <a-select-opt-group
    :key="key"
    :label="label"
  >
    <slot />
    <template v-if="$slots.label" #label>
      <slot name="label" />
    </template>
  </a-select-opt-group>
</template>

<script>
import { defineComponent } from 'vue'
import { SelectOptGroup } from 'ant-design-vue'
export default defineComponent({
  name: 'ZSelectOptGroup',
  components: {
    ASelectOptGroup: SelectOptGroup
  },
  props: {
    key: {
      type: String,
      default: undefined
    },
    label: {
      type: [String, Function],
      default: undefined
    }
  }
})
</script>
